#include <iostream>
#include "includes/project-base.hh"
#include "includes/subproject-base.hh"
#include "projects/includes/project_constantAdvection_1D_YASP.hh"
#include "projects/includes/project_soundWave_1D_YASP.hh"
#include "projects/includes/project_euler_1D_YASP.hh"
#include "projects/includes/project_mhd_1D_YASP.hh"
#include "projects/includes/project_fv_2D_YASP.hh"
#include "projects/includes/project_fv_3D_YASP.hh"
#include "projects/includes/project_dg_1D_YASP.hh"

ProjectBase::ProjectBase(){
  // basis =new BasisFunction();  
}

ProjectBase::~ProjectBase(){
}

void ProjectBase::add_subproject(SubprojectBase* subproject){
  subprojects.push_back(subproject);
}

SubprojectBase* ProjectBase::get_subproject(int index){
  return subprojects[index];
}

int ProjectBase::get_subproject_number(){
  return subprojects.size();
}

ProjectBase* create_project(PROJ_SIGNATURE signature)
{
    ProjectBase* p;

    switch (signature) {
    case constantAdvection_1D_YASP:
      p = new Project_constantAdvection_1D_YASP();
      break;
    case soundWave_1D_YASP:
      p = new Project_soundWave_1D_YASP();
      break;
    case euler_1D_YASP:
      p = new Project_euler_1D_YASP();
      break;
    case mhd_1D_YASP:
      p = new Project_MHD_1D_YASP();
      break;
    case fv_2D_YASP:
      p = new Project_fv_2D_YASP();
      break;
    case fv_3D_YASP:
      p = new Project_fv_3D_YASP();
      break;
    case dg_1D_YASP:
      p = new Project_dg_1D_YASP();
      break;
    default:
      std::cout << "Need install an existing project" << std::endl;
      return NULL;
    }

    return p;
}
